import NotFound from "@/views/404";

import UserApp from "@/views/User";
import Home from "@/views/Home";
import Layout from "@/views/Layout";
import Seed from "@/views/seed/Download";

import QuestionList from "@/views/forum";
import PostDetail from "@/views/PostDetail";
import MessageListView from "@/views/MessageList";
import ConversationView from "@/views/ConversationView";
import UserCenter from "@/views/userCenter";
import DrawPrizes from "@/views/Activity/DrawPrizes";
import PostForm from "@/views/forum/PostForm";
import UserAdmin from "@/views/Admin/User";
import Invitation from "@/views/Admin/Invitation";
import Guide from "@/views/Guide";
import ActivityGuide from "@/views/ActivityGuide";
import ResourcesRule from "@/views/ResourcesRule";

const routes = [
  {
    path: "/",
    element: <Layout></Layout>,
    children: [
      {
        path: "",
        element: <Home></Home>,
      },
      {
        path: "seed",
        element: <Seed></Seed>,
      },
      {
        path: "forum",
        element: <QuestionList></QuestionList>,
      },
      {
        path: "messagelist",
        element: <MessageListView></MessageListView>,
      },
      {
        path: "messagelist/:userId",
        element: <MessageListView></MessageListView>,
      },
      {
        path: "usercenter",
        element: <UserCenter></UserCenter>,
      },
      {
        path: "activity",
        element: <DrawPrizes></DrawPrizes>,
      },
      {
        path: "useradmin",
        element: <UserAdmin></UserAdmin>,
      },
      {
        path: "invitationadmin",
        element: <Invitation></Invitation>,
      },
    ],
  },
  {
    path: "forum/post",
    element: <PostForm></PostForm>,
  },
  
  {
    path: "/conversation/:id",
    element: <ConversationView></ConversationView>,
  },
  {
    path: "/postdetail/:id",
    element: <PostDetail></PostDetail>,
  },
  {
    path: "/user/:step",
    element: <UserApp></UserApp>,
  },
  {
    path: "/docs/guide",
    element: <Guide></Guide>,
  },
  {
    path: "/guide/resources",
    element: <ResourcesRule></ResourcesRule>
  },
  {
    path: "/guide/activity",
    element: <ActivityGuide></ActivityGuide>
  },
  {
    path: "*",
    element: <NotFound></NotFound>,
  },
];

export default routes;
